package com.ks.BusAlarm;

import android.content.Context;
import android.content.SharedPreferences;

public class Preferences {

	SharedPreferences sp;
	SharedPreferences.Editor spe;

	Boolean PrefVibration;

	Context context;
	public Preferences(Context pContext) {
		context = pContext;
		context.getSharedPreferences("BusPref", 0);
		spe = sp.edit();
	}

	public void toglePrefVibration() {
		spe = sp.edit();
		
		PrefVibration = sp.getBoolean("PrefVibration", false);
		spe.putBoolean("PrefVibration", !PrefVibration);
		
		ksLog.d("prefVibration", PrefVibration);
		
		spe.commit();
	}
	
	public Boolean getPrefVibration() {
		PrefVibration = sp.getBoolean("PrefVibration", false);
		return PrefVibration;
	}
}
